{extend name='main'}

{block name="content"}

<form onsubmit="return false;" data-auto="true" method="post" class='layui-form layui-card' autocomplete="off">

    <div class="layui-tab layui-tab-card">
        <ul class="layui-tab-title">
            <li class="layui-this">基础设置</li>
            <li>利息宝设置</li>
            <li>银行设置</li>
            <li>短信宝设置</li>
            <li>体验金设置</li>
            <li>提现设置</li>
            <li>邀请/注册设置</li>
        </ul>
        <div class="layui-tab-content" style="">
            <div class="layui-tab-item layui-show">
                <div class="layui-card-body padding-40 layui-col-md10">
                    <!--<label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">收款银行卡号</span>
                        <input name="master_cardnum" required value="{:config('master_cardnum')}" class="layui-input">
                    </label>
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">收款人</span>
                        <input name="master_name" required value="{:config('master_name')}" class="layui-input">
                    </label>
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">所属银行</span>
                        <input name="master_bank" required value="{:config('master_bank')}" class="layui-input">
                    </label>
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">银行地址</span>
                        <input name="master_bk_address" required value="{:config('master_bk_address')}" class="layui-input">
                    </label>
                    <hr/>-->
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">货币</span>
                        <input name="currency" required placeholder="货币 如: $" value="{:config('currency')}"
                               class="layui-input">
                        <p class="help-block">货币符号</p>
                    </label>
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">手机区号</span>
                        <input name="lang_tel_pix" required placeholder="区号，如巴西：+55" value="{:config('lang_tel_pix')}"
                               class="layui-input">
                        <p class="help-block">区号，如巴西：+55</p>
                    </label>
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">快捷金额</span>
                        <input name="recharge_money_list" required value="{:config('recharge_money_list')}"
                               class="layui-input">
                        <p class="help-block">充值页面 快捷金额</p>
                    </label>
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">交易所需余额</span>
                        <!-- <span class="nowrap color-desc">StoreTitle</span> -->
                        <input name="deal_min_balance" required value="{:config('deal_min_balance')}"
                               class="layui-input">
                        <input type="hidden" name="_csrf_" value="{:systoken('deal_console')}">
                        <p class="help-block">交易所需余额</p>
                    </label>
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">自动过期充值订单</span>
                        <!-- <span class="nowrap color-desc">StoreTitle</span> -->
                        <input name="clean_recharge_hour" required value="{:config('clean_recharge_hour')}"
                               class="layui-input">
                        <p class="help-block">未支付的充值订单x小时后自动过期，必须为整数，如24小时</p>
                    </label>
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">未订单的支付等待时长（秒）</span>
                        <!-- <span class="nowrap color-desc">OrderWaitTime</span> -->
                        <input name="deal_timeout" required placeholder="请输入订单支付等待时长" value="{:config('deal_timeout')}"
                               class="layui-input">
                        <p class="help-block">订单支付等待时长，新下订单未在此时间内容完成支付将会被自动取消</p>
                    </label>
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">重复做单</span>
                        <input name="is_same_yesterday_order" required
                               placeholder="0=不允许，1=允许" value="{:config('is_same_yesterday_order')}"
                               class="layui-input">
                        <p class="help-block">0=不允许，1=允许，如果昨天用户做了VIP1级别的单，那么他今天就做不了VIP1了，必须升级才能继续做单。</p>
                    </label>
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">匹配范围</span>
                        <!-- <span class="nowrap color-desc">OrderClearTime</span> -->
                        <div id="deal_rule" style="position:relative; margin: 10px 0px;" class="demo-slider"></div>
                        <div id="test-slider-tips2" style="position:relative; margin: 10px 0px;" class="help-block">
                            匹配范围：{:config('deal_min_num')}% ~ {:config('deal_max_num')}%
                        </div>
                        <p class="help-block">系统自动给用户派单的金额范围，计算公式：用户余额 x （最小～最大 随机值）,如果用户加入了叠加组或有打针的订单情况，则不受这个控制</p>
                        <input type="hidden" name="deal_min_num" id='min' value="{:config('deal_min_num')}">
                        <input type="hidden" name="deal_max_num" id='max' value="{:config('deal_max_num')}">
                    </label>

                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">当日交易次数限制</span>
                        <input name="deal_count" required value="{:config('deal_count')}" class="layui-input">
                        <p class="help-block">当日交易次数限制</p>
                    </label>
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">奖励交易次数</span>
                        <input name="deal_reward_count" required value="{:config('deal_reward_count')}"
                               class="layui-input">
                        <p class="help-block">奖励交易次数</p>
                    </label>

                    <!--<label class="layui-form-item margin-top-20 block relative">-->
                    <!--<span class="color-green margin-right-10">直推会员推广佣金</span>-->
                    <!--&lt;!&ndash; <span class="nowrap color-desc">OrderClearTime</span> &ndash;&gt;-->
                    <!--<input name="1_reward" max="1" min="0" step="0.01" required value="{:config('1_reward')}" type="number" class="layui-input">-->
                    <!--<p class="help-block">推广佣金</p>-->
                    <!--</label>-->

                    <!--<label class="layui-form-item margin-top-20 block relative">-->
                    <!--<span class="color-green margin-right-10">上两级会员推广佣金</span>-->
                    <!--&lt;!&ndash; <span class="nowrap color-desc">OrderClearTime</span> &ndash;&gt;-->
                    <!--<input name="2_reward" max="1" min="0" step="0.01" required value="{:config('2_reward')}" type="number" class="layui-input">-->
                    <!--<p class="help-block">推广佣金</p>-->
                    <!--</label>-->
                    <!--<label class="layui-form-item margin-top-20 block relative">-->
                    <!--<span class="color-green margin-right-10">上三级会员推广佣金</span>-->
                    <!--&lt;!&ndash; <span class="nowrap color-desc">OrderClearTime</span> &ndash;&gt;-->
                    <!--<input name="3_reward" max="1" min="0" step="0.01" required value="{:config('3_reward')}" type="number" class="layui-input">-->
                    <!--<p class="help-block">推广佣金</p>-->
                    <!--</label>-->

                    <!--<label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">普通会员交易佣金</span>
                        &lt;!&ndash; <span class="nowrap color-desc">OrderClearTime</span> &ndash;&gt;
                        <input name="vip_1_commission" max="1" min="0" step="0.01" required
                               value="{:config('vip_1_commission')}" type="number" class="layui-input">
                        <p class="help-block">交易佣金</p>
                    </label>
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">上一级会员交易佣金</span>
                        &lt;!&ndash; <span class="nowrap color-desc">OrderClearTime</span> &ndash;&gt;
                        <input name="1_d_reward" max="1" min="0" step="0.01" required value="{:config('1_d_reward')}"
                               type="number" class="layui-input">
                        <p class="help-block">交易佣金</p>
                    </label>
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">上二级会员交易佣金</span>
                        &lt;!&ndash; <span class="nowrap color-desc">OrderClearTime</span> &ndash;&gt;
                        <input name="2_d_reward" max="1" min="0" step="0.01" required value="{:config('2_d_reward')}"
                               type="number" class="layui-input">
                        <p class="help-block">交易佣金</p>
                    </label>
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">上三级会员交易佣金</span>
                        &lt;!&ndash; <span class="nowrap color-desc">OrderClearTime</span> &ndash;&gt;
                        <input name="3_d_reward" max="1" min="0" step="0.01" required value="{:config('3_d_reward')}"
                               type="number" class="layui-input">
                        <p class="help-block">交易佣金</p>
                    </label>
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">上四级会员交易佣金</span>
                        &lt;!&ndash; <span class="nowrap color-desc">OrderClearTime</span> &ndash;&gt;
                        <input name="4_d_reward" max="1" min="0" step="0.01" required value="{:config('4_d_reward')}"
                               type="number" class="layui-input">
                        <p class="help-block">交易佣金</p>
                    </label>
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">上五级会员交易佣金</span>
                        &lt;!&ndash; <span class="nowrap color-desc">OrderClearTime</span> &ndash;&gt;
                        <input name="5_d_reward" max="1" min="0" step="0.01" required value="{:config('5_d_reward')}"
                               type="number" class="layui-input">
                        <p class="help-block">交易佣金</p>
                    </label>-->
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">订单冻结时间</span>
                        <!-- <span class="nowrap color-desc">OrderClearTime</span> -->
                        <input name="deal_feedze" required value="{:config('deal_feedze')}" class="layui-input">
                        <p class="help-block">订单冻结时间，单位秒，如一个小时: 3600</p>
                    </label>

                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">允许违规次数</span>
                        <input name="deal_error" required placeholder="请输入已发货订单自动确认收货时长" value="{:config('deal_error')}"
                               class="layui-input">
                        <p class="help-block">允许违规次数</p>
                    </label>
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">提交订单延时时间(单位/秒)</span>
                        <p>
                            远程主机分配时间: <input name="deal_zhuji_time" style="width:100px;display: inline-block" required
                                             placeholder="" value="{:config('deal_zhuji_time')}" class="layui-input">
                            等待商家响应时间 <input name="deal_shop_time" style="width:100px;display: inline-block" required
                                            placeholder="" value="{:config('deal_shop_time')}" class="layui-input">

                        </p>
                        <p class="help-block">时间由2部分组成,默认都是5秒,总共10秒</p>
                    </label>
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">提现时间</span>
                        <input style="width: 120px;display: inline-block" name="tixian_time_1" required
                               placeholder="提现开始时间" value="{:config('tixian_time_1')}" class="layui-input">
                        -
                        <input style="width: 120px;display: inline-block" name="tixian_time_2" required
                               placeholder="提现结束时间" value="{:config('tixian_time_2')}" class="layui-input">
                        <p class="help-block">只支持整点, 如08:00-20:00,请直接输入 8 - 20</p>
                    </label>

                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">充值时间</span>
                        <input style="width: 120px;display: inline-block" name="chongzhi_time_1" required
                               placeholder="提现开始时间" value="{:config('chongzhi_time_1')}" class="layui-input">
                        -
                        <input style="width: 120px;display: inline-block" name="chongzhi_time_2" required
                               placeholder="提现结束时间" value="{:config('chongzhi_time_2')}" class="layui-input">
                        <p class="help-block">只支持整点, 如08:00-20:00,请直接输入 8 - 20</p>
                    </label>
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">抢单时间</span>
                        <input style="width: 120px;display: inline-block" name="order_time_1" required
                               placeholder="抢单开始时间" value="{:config('order_time_1')}" class="layui-input">
                        -
                        <input style="width: 120px;display: inline-block" name="order_time_2" required
                               placeholder="抢单结束时间" value="{:config('order_time_2')}" class="layui-input">
                        <p class="help-block">只支持整点, 如08:00-20:00,请直接输入 8 - 20</p>
                    </label>
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">商城状态</span>
                        <input style="width: 120px;display: inline-block" name="shop_status" required placeholder="商城状态"
                               value="{:config('shop_status')}" class="layui-input">
                        <p class="help-block">商城状态: 1开启 0关闭</p>
                    </label>
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">app下载地址</span>
                        <input name="app_url" required placeholder="请输入app下载地址" value="{:config('app_url')}"
                               class="layui-input">
                        <p class="help-block">app下载地址</p>
                    </label>
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">版本号</span>
                        <input name="version" required placeholder="请输入版本" value="{:config('version')}"
                               class="layui-input">
                        <p class="help-block">版本号</p>
                    </label>
                </div>

            </div>
            <div class="layui-tab-item">
                <div class="layui-card-body padding-40 layui-col-md8">
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">开启利息宝</span>
                        <input name="enable_lxb" required value="{:config('enable_lxb')}" class="layui-input">
                        <p class="help-block">0=关闭，1=启用</p>
                    </label>
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">日利率</span>
                        <input name="lxb_bili" required value="{:config('lxb_bili')}" class="layui-input">
                        <p class="help-block">利息宝日利率, 直接写小数,没有百分号</p>
                    </label>
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">转入最小额度</span>
                        <input name="lxb_ru_min" required value="{:config('lxb_ru_min')}" class="layui-input">
                        <p class="help-block">利息宝转入额度最低</p>
                    </label>
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">转入最大额度</span>
                        <input name="lxb_ru_max" required value="{:config('lxb_ru_max')}" class="layui-input">
                        <p class="help-block">利息宝转入额度最高</p>
                    </label>


                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">转出到余额时间</span>
                        <input name="lxb_time" required value="{:config('lxb_time')}" class="layui-input">
                        <p class="help-block">转出到余额,实际到账时间 /小时</p>

                    </label>
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">上一级会员收益比例</span>
                        <input name="lxb_sy_bili1" required value="{:config('lxb_sy_bili1')}" class="layui-input">
                    </label>
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">上两级会员收益比例</span>
                        <input name="lxb_sy_bili2" required value="{:config('lxb_sy_bili2')}" class="layui-input">
                    </label>
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">上三级会员收益比例</span>
                        <input name="lxb_sy_bili3" required value="{:config('lxb_sy_bili3')}" class="layui-input">
                    </label>
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">上四级会员收益比例</span>
                        <input name="lxb_sy_bili4" required value="{:config('lxb_sy_bili4')}" class="layui-input">
                    </label>
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">上五级会员收益比例</span>
                        <input name="lxb_sy_bili5" required value="{:config('lxb_sy_bili5')}" class="layui-input">
                    </label>


                </div>
            </div>
            <div class="layui-tab-item">
                <div class="layui-card-body padding-40 layui-col-md8">
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">银行设置</span>
                        <textarea style="min-height: 130px;line-height:16px" name="bank" required class="layui-input">{$bank}</textarea>
                        <p class="help-block">一行一个, 银行代码|银行名称</p>
                    </label>
                </div>
            </div>
            <div class="layui-tab-item">
                <div class="layui-card-body padding-40 layui-col-md8">
                    <h3>短信宝申请地址 <a target="_blank" href="http://www.smsbao.com/reg?r=11292">短信宝申请</a></h3>
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">短信宝账号</span>
                        <input name="user" required value="{:config('smsbao')['user']}" class="layui-input">
                        <p class="help-block">利息宝日利率, 直接写小数,没有百分号</p>
                    </label>

                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">短信宝密码</span>
                        <input name="pass" required value="{:config('smsbao')['pass']}" class="layui-input">
                        <p class="help-block">密码,无需md5</p>
                    </label>
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">模板签名</span>
                        <input name="sign" required value="{:config('smsbao')['sign']}" class="layui-input">
                        <p class="help-block">模板需要自行申请</p>
                    </label>
                </div>


            </div>
            <div class="layui-tab-item">
                <div class="layui-card-body padding-40 layui-col-md8">
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">新用户体验金</span>
                        <input name="free_balance" required value="{:config('free_balance')}" type="number"
                               class="layui-input">
                    </label>
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">体验金有效期</span>
                        <input name="free_balance_time" required value="{:config('free_balance_time')}"
                               class="layui-input" type="number" maxlength="5">
                        <p class="help-block">单位小时,设置为0 永不过期</p>
                    </label>
                </div>
            </div>
            <div class="layui-tab-item">
                <div class="layui-card-body padding-40 layui-col-md8">
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">提现到钱包</span>
                        <input name="payout_wallet" placeholder="提现到钱包"
                               value="{:config('payout_wallet')}" class="layui-input">
                        <p class="help-block">提现到钱包: 1开启 0关闭</p>
                    </label>
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">提现到银行卡</span>
                        <input name="payout_bank" required
                               placeholder="提现到银行卡" value="{:config('payout_bank')}" class="layui-input">
                        <p class="help-block">提现到银行卡: 1开启 0关闭</p>
                    </label>
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">提现到usdt</span>
                        <input name="payout_usdt" required
                               placeholder="提现到usdt" value="{:config('payout_usdt')}" class="layui-input">
                        <p class="help-block">提现到usdt: 1开启 0关闭</p>
                    </label>
                    <label class="layui-form-item margin-top-20 block relative">
                        <span class="color-green margin-right-10">首次提现后升级到级别</span>
                        <input name="first_deposit_upgrade_level" required type="number"
                               placeholder="填写整数，如： 0 1 2 3" value="{:config('first_deposit_upgrade_level')}"
                               class="layui-input">
                        <p class="help-block">用户首次提现后，升级到指定级别，如： 1，那么就是升级到VIP1，0为不升级</p>
                    </label>
                </div>
            </div>
            <div class="layui-tab-item">
                <div class="layui-card-body padding-40 layui-col-md8">
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">邀请新用户获得</span>
                        <input name="invite_one_money" required value="{:config('invite_one_money')}" type="number"
                               class="layui-input">
                        <p class="help-block">每邀请一位新用户获得多少钱</p>
                    </label>
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">推荐人获利</span>
                        <input name="invite_recharge_money" required value="{:config('invite_recharge_money')}"
                               class="layui-input" type="number">
                        <p class="help-block">新用户首次充值，邀请人获得金额比例，如获得10% 设置为0.1</p>
                    </label>
                    <label class="layui-form-item block relative">
                        <span class="color-green margin-right-10">注册限制</span>
                        <input name="ip_register_number" required value="{:config('ip_register_number')}"
                               class="layui-input" type="number">
                        <p class="help-block">单个IP最多注册多少个账号，0=不限制</p>
                    </label>
                </div>
            </div>
        </div>
        <div class="layui-form-item text-center margin-top-20">
            <button class="layui-btn" type="submit">保存配置</button>
        </div>
    </div>
</form>
<script>
    layui.use('slider', function () {
        var $ = layui.$
            , slider = layui.slider,
            min = "{:config('deal_min_num')}",
            max = "{:config('deal_max_num')}";
        //默认滑块
        //开启范围选择
        slider.render({
            elem: '#deal_rule'
            , value: [min, max] //初始值
            , range: true //范围选择
            , change: function (vals) {
                $('#test-slider-tips2').html('匹配范围：' + vals[0] + '% ~ ' + vals[1] + '%');
                $('#min').val(vals[0]);
                $('#max').val(vals[1]);
            }
        });
    });
</script>

{/block}
